<?php

namespace App\Containers\AppSection\Signature\Traits;

use App\Containers\AppSection\Signature\Tasks\FindSignatureByIdTask;

trait IsOwnerTrait
{
    public function isOwner(): bool
    {
        $profile = $this->profile();
        $signature = app(FindSignatureByIdTask::class)->run($this->id);

        return $profile->id === $signature->profile->id;
    }
}
